﻿using Common.Enum;
using System.ComponentModel.DataAnnotations;

namespace Entity.ERP.DTO.PurchaseOrder
{
    /// <summary>
    /// 采购订单模型 - 新增
    /// </summary>
    public class PurchaseOrderAddDTO
    {
        /// <summary>
        /// 采购编码
        /// </summary>
        [Required(ErrorMessage = "采购编码Code不能为空")]
        public string Code { get; set; }

        /// <summary>
        /// 流转卡号
        /// </summary>
        [Required(ErrorMessage = "流转卡号CardNo不能为空")]
        public string CardNo { get; set; }

        /// <summary>
        /// 供应商 ID
        /// </summary>
        [Required(ErrorMessage = "供应商SupplierId不能为空")]
        public string SupplierId { get; set; }

        /// <summary>
        /// 单据状态
        /// </summary>
        [Required(ErrorMessage = "单据状态Status不能为空")]
        public StateEnum.PurchaseType Status { get; set; }

        /// <summary>
        /// 审核状态
        /// </summary>
        [Required(ErrorMessage = "审核状态ExamStatus不能为空")]
        public StateEnum.ExamStatus ExamStatus { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }

        /// <summary>
        /// 附件
        /// </summary>
        public string? File { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Required(ErrorMessage = "创建时间CreateTime不能为空")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 采购订单子单
        /// </summary>
        [Required(ErrorMessage = "采购订单子单items不能为空")]
        public List<PurchaseOrderItemAddDTO> Items { get; set; }
    }
}